package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TablePassCardRuleOperationsMapper;
import com.ruoyi.system.domain.TablePassCardRuleOperations;
import com.ruoyi.system.service.ITablePassCardRuleOperationsService;

/**
 * 桌台次卡规则操作日志 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-23
 */
@Service
public class TablePassCardRuleOperationsServiceImpl implements ITablePassCardRuleOperationsService
{
    @Autowired
    private TablePassCardRuleOperationsMapper tablePassCardRuleOperationsMapper;

    /**
     * 查询桌台次卡规则操作日志
     *
     * @param id 桌台次卡规则操作日志主键
     * @return 桌台次卡规则操作日志
     */
    @Override
    public TablePassCardRuleOperations selectTablePassCardRuleOperationsById(Long id)
    {
        return tablePassCardRuleOperationsMapper.selectTablePassCardRuleOperationsById(id);
    }

    /**
     * 通过条件查询桌台次卡规则操作日志列表
     *
     * @param operatedStoreCode,operationType,passCardCode,operationStartTime,operationEndTime 操作门店，操作类型，桌台时长卡编码，操作开始时间，操作结束时间
     * @return 桌台次卡规则操作日志
     */
    @Override
    public List<TablePassCardRuleOperations> selectTablePassCardRuleOperationsList(String operatedStoreCode, String operationType, String passCardCode, Date operationStartTime, Date operationEndTime)
    {
        return tablePassCardRuleOperationsMapper.selectTablePassCardRuleOperationsList(operatedStoreCode,operationType,passCardCode,operationStartTime,operationEndTime);
    }

    /**
     * 新增桌台次卡规则操作日志
     *
     * @param tablePassCardRuleOperations 桌台次卡规则操作日志
     * @return 结果
     */
    @Override
    public int insertTablePassCardRuleOperations(TablePassCardRuleOperations tablePassCardRuleOperations)
    {
        tablePassCardRuleOperations.setCreateTime(DateUtils.getNowDate());
        return tablePassCardRuleOperationsMapper.insertTablePassCardRuleOperations(tablePassCardRuleOperations);
    }

    /**
     * 修改桌台次卡规则操作日志
     *
     * @param tablePassCardRuleOperations  桌台次卡规则操作日志
     * @return 结果
     */
    @Override
    public int updateTablePassCardRuleOperations(TablePassCardRuleOperations tablePassCardRuleOperations)
    {
        return tablePassCardRuleOperationsMapper.updateTablePassCardRuleOperations(tablePassCardRuleOperations);
    }

    /**
     * 通过id批量删除桌台次卡规则操作日志信息
     *
     * @param ids 需要删除的桌台次卡规则操作日志主键
     * @return 结果
     */
    @Override
    public int deleteTablePassCardRuleOperationsByIds(Long[] ids)
    {
        return tablePassCardRuleOperationsMapper.deleteTablePassCardRuleOperationsByIds(ids);
    }

    /**
     * 通过id删除桌台次卡规则操作日志信息
     *
     * @param id 桌台次卡规则操作日志主键
     * @return 结果
     */
    @Override
    public int deleteTablePassCardRuleOperationsById(Long id)
    {
        return tablePassCardRuleOperationsMapper.deleteTablePassCardRuleOperationsById(id);
    }
}
